﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <meta charset="utf-8" />
    <link href="http://cdn.bootcss.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="Scripts/lotUploader/lotuploader1.0.1.min.css" rel="stylesheet" />
</head>
<body>
    <div id="lot-uploader"></div>
    <script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
    <script src="Scripts/lotUploader/lotuploader1.0.1.min.js"></script>
    <script type="text/javascript">
        $.lotuploader({
            lotDocId: 'lot-uploader',               //ID
            lotUrl: '/Home/Upload',                 //服务器Post地址
            oneFile: true,                          //是否是单文件上传
            fileSize: 1024 * 1024 * 5,              //单个图片Size
            btnStr: '点我就上传默认展图',            //控件显示的字
            lotSuccessFunc: function (data) {       //成功回调函数
                alert(data.msg);
            },
            lotErrorFunc: function (msg) {          //失败回调函数
                $('#lot-uploader').append('<div class="lot-temp" style="color:red">' + msg + '</div> ');
                setTimeout(function () {
                    $('.lot-temp').remove();
                }, 2000);
            }
        });
    </script>
</body>
</html>
